const formRows = [{
    span: 24,
    label: '标题',
    component: 'AInput',
    placeholder: '请输入标题',
    prop: 'columnName',
    allowClear: true
  },
  {
    span: 12,
    label: '发布日期',
    component: 'ADate',
    placeholder: '请选择发布日期',
    prop: 'publishDate'
  },
  {
    span: 24,
    label: '内容',
    component: 'RichTextEdit',
    prop: 'cotent'
  },
  {
    span: 24,
    label: '附件',
    component: 'AUploadMultiple',
    prop: 'annexIds'
  }
]

const formRules = {
  columnName: [{
      required: true,
      message: '标题不能为空',
      trigger: 'blur'
    },
    {
      min: 1,
      max: 100,
      message: '输入的字数不能超过100个',
      trigger: 'blur'
    }
  ],
  publishDate: [{
    required: true,
    message: '发布日期不能为空',
    trigger: 'blur'
  }],
  cotent: [{
    required: true,
    message: '内容不能为空',
    trigger: ['blur']
  }]
}

const formInfo = [{
    label: '标题',
    value: '-',
    key: 'columnName'
  },
  {
    label: '发布日期',
    value: '-',
    key: 'publishDate'
  },
  {
    label: '内容',
    value: '-',
    key: 'cotent',
    isVHtml: true
  },
  {
    label: '附件',
    value: '-',
    key: 'annexes',
    isVHtml: true
  }
]

module.exports = {
  formRows,
  formRules,
  formInfo
}